-- GENERATED SPELL FOR [Sandfury Firecaller] --


function spell0_5647(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5647', 3000, 1)
end

function spell1_5647(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(11990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5647', 9000, 1)
end

function Sorts_5647(pUnit, Event)
local choix_sorts_5647 = math.random(0, 1)
if choix_sorts_5647 == 0 then
pUnit:RegisterEvent('spell0_5647', 1, 1)
end
if choix_sorts_5647 == 1 then
pUnit:RegisterEvent('spell1_5647', 1, 1)
end
end

function mob5647_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5647', math.random(1500, 3000), 1)
end

function mob5647_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5647_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5647_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5647, 1, 'mob5647_Action')
RegisterUnitEvent(5647, 2, 'mob5647_Leave')
RegisterUnitEvent(5647, 3, 'mob5647_Kill')
RegisterUnitEvent(5647, 4, 'mob5647_Die')
